package memory

import (
	"context"
	"time"

	"xagent/internal/types"
)

// Entry represents a memory entry in the memory system
type Entry struct {
	ID        string
	Type      types.MemoryType
	Content   string
	Metadata  map[string]interface{}
	CreatedAt time.Time
	UpdatedAt time.Time
}

// Manager defines the interface for memory management
type Manager interface {
	// Store stores a memory entry
	Store(ctx context.Context, entry *Entry) error

	// Retrieve retrieves memory entries by type
	Retrieve(ctx context.Context, memType types.MemoryType, limit int) ([]*Entry, error)

	// Search searches memory entries by content
	Search(ctx context.Context, query string, limit int) ([]*Entry, error)

	// Delete deletes a memory entry
	Delete(ctx context.Context, id string) error
}
